﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Domain; // подключение Domain
using Session; // подключение Session

namespace ZeuS
{
    public partial class FormRcPass : Form
    {
        BrokerPersonal b_pers = new BrokerPersonal(); 
        public FormRcPass()
        {
            InitializeComponent();
        }

        private void RcPass_Ex_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void RcPass_Rc_Click(object sender, EventArgs e)
        {
            try
            {
                Dm_Pers p = new Dm_Pers(); // объявление Personal
                p.Login = Login_tE.Text;
                p.Phone = Phone_tE.Text;
                /*
                string login = Login_tE.Text;
                string phone = Phone_tE.Text;
                */
                MessageBox.Show("Ваш пароль: " + b_pers.Phone(p));            
            }

            catch (Exception ex)
            {
                MessageBox.Show("Неверно указаны данные " + ex.ToString());
            }
        }

        private void FormRcPass_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
        }
    }
}
